<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<html>
<body>
<jsp:include page="_headCharge.jsp"></jsp:include>
<form class="form-inline" action="" method="post">
从<div class="datepicker input-append">
    <input data-format="yyyy-MM-dd" type="text" value="${beginDate}" name="beginDate"></input>
    <span class="add-on">
      <i data-time-icon="icon-time" data-date-icon="icon-calendar">
      </i>
    </span>
  </div>
到
  <div class="datepicker input-append">
    <input data-format="yyyy-MM-dd" type="text" value="${endDate}" name="endDate"></input>
    <span class="add-on">
      <i data-time-icon="icon-time" data-date-icon="icon-calendar">
      </i>
    </span>
  </div>
  <button type="submit" class="btn">查询</button>
</form>
<table class="table table-bordered">
  <thead>
    <tr> 	 	 			 	
      <th>充值渠道</th>
      <th>充值金额(￥)</th>
      <th>充值人数</th>
      <th>充值人次</th>
    </tr>
  </thead>
  <fmt:formatNumber var="man" value="${detail.manGold / 100}" type="number" groupingUsed="true" minFractionDigits="2"/>
  <fmt:formatNumber var="women" value="${detail.womenGold / 100}" type="number" groupingUsed="true" minFractionDigits="2"/>
  <span>男角色充值(RMB)：<c:out value="${man}"/></span>
  <br/>
  <span>女角色充值(RMB)：<c:out value="${women}"/></span>
  <tbody>
  <c:set var="allGold" value="0"/>
  <c:set var="allPeople1" value="0"/>
  <c:set var="allTimes1" value="0"/>
  <c:forEach var="m" items="${detail.list}">
    <tr>
    <td>${m.payType == 3 ? '支付宝' : m.payType == 24 ? '网银' : m.payType == 25 ? '手机充值' : m.payType == 27 ? '手机短信' : m.payType == 29 ? '财付通' : m.payType == 100 ? '游戏卡' : m.payType == 20 ? '游戏卡-骏网' : m.payType == 21 ? '游戏卡 -盛大' : m.payType == 22 ? '游戏卡-网易' : m.payType == 23 ? '游戏卡-征途' : m.payType}</td>
      <td>${m.gold/100}</td><!-- K币/100 = RMB -->
      <c:set var="allGold" value="${allGold + m.gold/100 }"/>
      <td>${m.people}</td>
      <c:set var="allPeople1" value="${allPeople1 + m.people }"/>
      <td>${m.times}</td>
      <c:set var="allTimes1" value="${allTimes1 + m.times }"/>
    </tr>
  </c:forEach>
  <tr>
  <td>合计</td>
  <td><c:out value="${allGold }"/></td>
  <td><c:out value="${ allPeople1}"/></td>
  <td><c:out value="${ allTimes1}"/></td>
  </tr>
  </tbody>
</table><br/>

<span>一次性充值统计</span><br/>
<table class="table table-bordered">
  <thead>
    <tr> 	 	 			 	
      <th>充值金额(￥)</th>
      <th>充值人数</th>
      <th>充值人次</th>
    </tr>
  </thead>
  <tbody>
  <c:set var="allPeople2" value="0"/>
  <c:set var="allTimes2" value="0"/>
  <c:forEach var="n" items="${detail.oneTimeChargeList}">
    <tr>
      <td>${n.keyStr}</td><!-- K币/100 = RMB -->
      <td>${n.people}</td>
       <c:set var="allPeople2" value="${allPeople2 + n.people }"/>
      <td>${n.times}</td>
      <c:set var="allTimes2" value="${allTimes2 + n.times }"/>
    </tr>
  </c:forEach>
  <tr>
  <td>合计</td>
  <td><c:out value="${ allPeople2}"/></td>
  <td><c:out value="${ allTimes2}"/></td>
  </tr>
  </tbody>
</table>
</body>
</html>